using NHibernate;

namespace ThunderJob.Persistence.Storage
{
    public class SimpleSessionStorage : ISessionStorage
    {
        private ISession session;

        public ISession GetSession()
        {
            return session;
        }

        public void SetSession(ISession session)
        {
            this.session = session;
        }

        public ISession DeleteSession()
        {
            ISession sessionDeleted = session;
            session = null;
            return sessionDeleted;
        }
    }
}